USE [SONALIKA_BGK_UPDATED]
GO

/****** Object:  Table [dbo].[BALANCE]    Script Date: 13-May-14 1:00:04 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[BALANCE](
	[BALANCE_ID] [int] IDENTITY(1,1) NOT NULL,
	[AMOUNT_PAID] [decimal](18, 2) NOT NULL,
	[PAID_DATE] [datetime] NOT NULL,
	[SALES_INVOICE_ID] [int] NOT NULL,
 CONSTRAINT [PK_BALANCE] PRIMARY KEY CLUSTERED 
(
	[BALANCE_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[BALANCE]  WITH CHECK ADD  CONSTRAINT [FK_BALANCE_SALES_INVOICES] FOREIGN KEY([SALES_INVOICE_ID])
REFERENCES [dbo].[SALES_INVOICES] ([SALES_INVOICE_ID])
GO

ALTER TABLE [dbo].[BALANCE] CHECK CONSTRAINT [FK_BALANCE_SALES_INVOICES]
GO


